
public class CapacityModule {
	
	private int capacity;
	private int maxCapacity;
	
	public CapacityModule(int capacity) {
		this.capacity = capacity;
		this.maxCapacity = capacity;
	}
	
	public synchronized void addOneToCapacity() {
		capacity++;
	}

	public synchronized  void removeFromCapacity() {
		capacity--;
	}

	public synchronized  int getCapacity() {
		return capacity;
	}

	public int getMaxCapacity() {
		return maxCapacity;
	}
	
	public void setCapacity(int capacity) {
		this.capacity = capacity;
	}

}
